import { DataSource } from 'typeorm';
import { ConfigService } from './src/infrastructure/config/config.service';
import { createDataSource } from './src/infrastructure/database/typeorm.config';

const configService = new ConfigService();
const dataSource = createDataSource(configService);

async function test() {
  await dataSource.initialize();
  console.log('Database connected');
  await dataSource.destroy();
}

test().catch(console.error);